package com.itheima.fanxing3;

import java.util.ArrayList;

public class Demo02 {


    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("坤坤");
        list.add("鹿鹿");
        list.add("签签");
        list.add("滔滔");
        sing(list);

        ArrayList<Integer> list1 = new ArrayList<>();
        dance(list1,123,456);
        System.out.println(list1);

    }


    public static <T> void sing(ArrayList<T> list) {
        for (T t : list) {
            System.out.println(t);
        }


    }

    public static <E> void dance(ArrayList<E> list, E e1, E e2) {
        list.add(e1);
        list.add(e2);

    }


}
